package com.ccp.dev.system.model;

import com.ccp.dev.core.basic.model.BaseModel;
import org.apache.commons.lang3.builder.ToStringBuilder;

import java.util.Objects;

/**
 * 下属管理 Model对象
 * @author y
 */
public class UserUnder extends BaseModel
{
	/**
	 * 主键
	 */
	protected String  id;
	/**
	 * 用户ID
	 */
	protected String  userId;
	/**
	 * 下属用户ID
	 */
	protected String  underUserId;
	/**
	 * 下属用户名
	 */
	protected String  underUserName;
	
	protected String leaderName="";

	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public String getUserId() {
		return userId;
	}

	public void setUserId(String userId) {
		this.userId = userId;
	}

	public String getUnderUserId() {
		return underUserId;
	}

	public void setUnderUserId(String underUserId) {
		this.underUserId = underUserId;
	}

	public String getUnderUserName() {
		return underUserName;
	}

	public void setUnderUserName(String underUserName) {
		this.underUserName = underUserName;
	}

	public String getLeaderName() {
		return leaderName;
	}

	public void setLeaderName(String leaderName) {
		this.leaderName = leaderName;
	}

	@Override
	public boolean equals(Object o) {
		if (this == o) {return true;}
		if (o == null || getClass() != o.getClass()) {return false;}
		UserUnder userUnder = (UserUnder) o;
		return Objects.equals(id, userUnder.id) &&
				Objects.equals(userId, userUnder.userId) &&
				Objects.equals(underUserId, userUnder.underUserId) &&
				Objects.equals(underUserName, userUnder.underUserName) &&
				Objects.equals(leaderName, userUnder.leaderName);
	}

	@Override
	public int hashCode() {
		return Objects.hash(id, userId, underUserId, underUserName, leaderName);
	}

	@Override
	public String toString() {
		return new ToStringBuilder(this)
				.append("id", id)
				.append("userId", userId)
				.append("underUserId", underUserId)
				.append("underUserName", underUserName)
				.append("leaderName", leaderName)
				.append("createBy", createBy)
				.append("createTime", createTime)
				.append("updateTime", updateTime)
				.append("updateBy", updateBy)
				.append("tenantId", tenantId)
				.toString();
	}
}